package com.example.feilin.controller;

import java.util.HashMap;
import java.util.Map;

import com.example.feilin.entity.SysConfig;
import com.jfinal.core.Controller;
import com.jfinal.plugin.activerecord.Page;

public class SysConfigController extends Controller {
	
	public void index() {
		render("list.html");
	}

	public void json() {		
		//int pageNumber = getParaToInt("page");
		//int pageSize = getParaToInt("pagesize");
		
		Page<SysConfig> page = SysConfig.me.paginate(getParaToInt("page", 1), getParaToInt("pagesize", 10));
		Map map = new HashMap();
		map.put("Rows", page.getList());
		map.put("Total", page.getTotalPage()); 
		renderJson(map);
	}
}
